package com.exam.Dao;

import com.exam.Domain.Question;
import com.exam.Domain.Test;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ITestDao {

    List<Test> findAllTest();

    List<Question> findQuestionList(String testId);

    Test findTestById(String testId);

    void updateTestAndQuest(String result,String userId,String testId,String questionId);

    void insertTestAndQuest(String result,String userId,String testId,String questionId);

    String findResult(String userId,String testId,String questionId);

    List<Question> findQuestionById(String testId,String userId);

    List<Question> findTrueResult(String testId);

    List<String> findDifference(String testId,String userId);

    int findQuestScore(String testId,String questionId);

    String findQuestionSolution(String testId,String questionId);

    void insertInitScore(String userId,String testId);

    int findIfExist(String userId,String testId);

    void updateScore(String userId,String testId,int all);

    int findExitScore(String userId,String testId);

    List<Test> findTestByUser(String userId);
}
